package com.iussoft.demo.ws;

import javax.jws.WebService;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @description: webservice接口实现
 * @author: Hou Dayu
 * @date: Created in 2020/10/27
 */
@WebService(endpointInterface="com.iussoft.demo.ws.BaseServiceInter")
public class BaseServiceImpl implements BaseServiceInter {

    public String isConnXML(String paramStr) {
        StringBuilder sb = new StringBuilder();
        try {
            Date date = new Date();
            DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            String ctime = df.format(date);
            System.out.println("请求到达,到达时间：" + ctime);
            System.out.println("请求信息为:" + paramStr);
            sb.append("请求到达时间：" + ctime);
            sb.append("\n请求信息为:" + paramStr);
        } catch (Exception e) {
            sb.append("调用服务出错~~;errorCode="+e.getMessage());
        }
        return sb.toString();
    }
}
